/*
 * Quaternion.h
 *
 *  Created on: 06-01-2013
 *
 */

#ifndef QUATERNION_H_
#define QUATERNION_H_

template <typename TYPE>
struct Quaternion
{
	TYPE w, x, y, z;

	Quaternion();
	Quaternion(TYPE w, TYPE x, TYPE y, TYPE z);

	TYPE				dot			(const Quaternion<TYPE>& other) const;
	Quaternion<TYPE>&	normalize	();

	Quaternion<TYPE>	operator-	() const;
	Quaternion<TYPE>	operator*	(TYPE mul) const;
	Quaternion<TYPE>	operator/	(TYPE div) const;
};

template <typename TYPE>
Quaternion<TYPE> operator+(const Quaternion<TYPE>& a, const Quaternion<TYPE>& b);

template <typename TYPE>
Quaternion<TYPE> lerp(const TYPE t, const Quaternion<TYPE>& a, const Quaternion<TYPE>& b);

template <typename TYPE>
Quaternion<TYPE> slerp(const TYPE t, const Quaternion<TYPE>& a, const Quaternion<TYPE>& b);

#endif /* QUATERNION_H_ */
